#ifndef _GPU_H
#define _GPU_H
/*
  author Sylvain Bertrand <digital.ragnarok@gmail.com>
  Protected by GNU Affero GPL v3 with some exceptions.
  See README at root of alga tree.
*/
#define MAX_SH_GPRS		256
#define MAX_TEMP_GPRS		16
#define MAX_SH_THDS		256
#define MAX_SH_STACK_ENTRIES	4096
#define MAX_FRC_EOV_CNT		16384
#define MAX_BACKENDS		8
#define MAX_BACKENDS_MASK	0xff
#define MAX_SIMDS		16
#define MAX_SIMDS_MASK		0xffff
#define MAX_PIPES		8
#define MAX_PIPES_MASK		0xff
#define MAX_LDS_NUM		0xffff

struct gpu_cfg
{
	unsigned num_ses;
	unsigned max_shader_pipes;
	unsigned max_tile_pipes;
	unsigned max_se_simds;
	unsigned max_backends;
	unsigned max_gprs;
	unsigned max_thds;
	unsigned max_stack_entries;
	unsigned max_hw_ctxs;
	unsigned max_gs_thds;
	unsigned sx_max_export_sz;
	unsigned sx_max_export_pos_sz;
	unsigned sx_max_export_smx_sz;
	unsigned sq_num_cf_insts;
	unsigned sx_num_of_sets; /* smx */
	unsigned sc_prim_fifo_sz;
	unsigned sc_hiz_tile_fifo_sz;
	unsigned sc_earlyz_tile_fifo_sz;
};

struct gpu
{
	struct gpu_cfg cfg;
};

void gpu_cfg_init(struct pci_dev *dev);
int gpu_init(struct pci_dev *dev);
#endif /* _GPU_H */
